/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

import java.math.BigDecimal;

/**
 * 单位设置Entity
 * @author HOHD
 * @version 2020-12-31
 */
@Table(name="st_unit_setting", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="name", attrName="name", label="单位名称", queryType=QueryType.LIKE),
		@Column(name="unit_group", attrName="unitGroup", label="单位组"),
		@Column(name="matrixing_index", attrName="matrixingIndex", label="换算系数"),
		@Column(name="base_unit", attrName="baseUnit", label="基础单位"),
		@Column(name="effect", attrName="effect", label="有效"),
		@Column(name="remarks", attrName="remarks", label="备注", queryType=QueryType.LIKE),
	}, orderBy="a.id DESC"
)
public class StUnitSetting extends DataEntity<StUnitSetting> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 单位名称
	private String unitGroup;		// 单位组
	private BigDecimal matrixingIndex;		// 换算系数
	private Integer baseUnit;		// 基础单位
	private Integer effect;		// 有效
	
	public StUnitSetting() {
		this(null);
	}

	public StUnitSetting(String id){
		super(id);
	}
	
	@Length(min=0, max=20, message="单位名称长度不能超过 20 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=20, message="单位组长度不能超过 20 个字符")
	public String getUnitGroup() {
		return unitGroup;
	}

	public void setUnitGroup(String unitGroup) {
		this.unitGroup = unitGroup;
	}
	
	public BigDecimal getMatrixingIndex() {
		return matrixingIndex;
	}

	public void setMatrixingIndex(BigDecimal matrixingIndex) {
		this.matrixingIndex = matrixingIndex;
	}
	
	public Integer getBaseUnit() {
		return baseUnit;
	}

	public void setBaseUnit(Integer baseUnit) {
		this.baseUnit = baseUnit;
	}
	
	public Integer getEffect() {
		return effect;
	}

	public void setEffect(Integer effect) {
		this.effect = effect;
	}
	
}